-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use less syscalls in FileDesc::set_{nonblocking,cloexec}
#39514
Conversation
Only set the flags if they differ from what the OS reported, use `FIONBIO` to atomically set the non-blocking IO flag on Linux.
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ Thanks! |
📌 Commit efeb42b has been approved by |
|
@nagisa It's hard to find docs on |
…chton Use less syscalls in `FileDesc::set_{nonblocking,cloexec}` Only set the flags if they differ from what the OS reported, use `FIONBIO` to atomically set the non-blocking IO flag on Linux.
…chton Use less syscalls in `FileDesc::set_{nonblocking,cloexec}` Only set the flags if they differ from what the OS reported, use `FIONBIO` to atomically set the non-blocking IO flag on Linux.
…chton Use less syscalls in `FileDesc::set_{nonblocking,cloexec}` Only set the flags if they differ from what the OS reported, use `FIONBIO` to atomically set the non-blocking IO flag on Linux.
You may also want to document, in the documentation for |
@joshtriplett This is private API as far as I can tell, and it's only used in places where we already pass |
@tbu- Ah, OK; thanks for the clarification. |
Only set the flags if they differ from what the OS reported, use
FIONBIO
to atomically set the non-blocking IO flag on Linux.